package com.itheima.date.exception;

public class ExceptionTest01 {
    public static void main(String[] args) {
        int[] arr={1,2};
        try {
            for (int i = 0; i < arr.length; i++) {
                System.out.println(arr[i]);
            }
        }catch (NullPointerException e){
            System.out.println("参数不能为null");
        }
    }
}
